"""
GUI应用启动脚本
提供基于MVC架构的固件下载图形界面
"""
import sys
import os

# 添加项目根目录到Python路径
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, ROOT_DIR)

from app.gui.main_window import main as gui_main

from app.utils.log import Log
from app.utils.log_ui import UILog

def main():
    """启动GUI应用程序"""
    print("正在启动 Bootloader By Can...")
    print("GUI界面基于MVC架构设计")
    print("="*50)
    Log.Open(True)
    UILog.Open(True)
    # 启动PyQt5 GUI应用
    gui_main()

def start_gui():
    """GUI启动入口函数"""
    main()

if __name__ == "__main__":
    main()